#include "Transaction.h"
#include <string>

CTransaction::CTransaction(void)
{
}

CTransaction::~CTransaction(void)
{
}

void CTransaction::SetTransactionID(char *sTransactionID) 
{
    strcpy_s(this->sTransactionID, sTransactionID);
}

void CTransaction::SetAccountID(char *sAccountID) 
{
    strcpy_s(this->sAccountID, sAccountID);
}

void CTransaction::SetFullName(char *sFullName) 
{
    strcpy_s(this->sFullName, sFullName);
}

void CTransaction::SetTime(struct tm *tmTimeTrans) 
{
    this->tmTimeTrans.tm_mday = tmTimeTrans->tm_mday;
    this->tmTimeTrans.tm_mon = tmTimeTrans->tm_mon;
    this->tmTimeTrans.tm_year = tmTimeTrans->tm_year;
}

void CTransaction::SetValueTras(long lValueTras) 
{
    this->lValueTras = lValueTras;
}

char* CTransaction::GetTransactionID()
{
	return (this->sTransactionID);
}

char* CTransaction::GetAccountID() 
{
	return (this->sAccountID);
}

char* CTransaction::GetFullName() 
{	
	return (this->sFullName);
}

long CTransaction::GetValueTrans() 
{
	return (this->lValueTras);
}

int CTransaction::GetDay() 
{
	return (this->tmTimeTrans.tm_mday);
}

int CTransaction::GetMonth() 
{
	return (this->tmTimeTrans.tm_mon + 1);
}

int CTransaction::GetYear() 
{
	return (this->tmTimeTrans.tm_year + 1900);
}